package com.metadata_system.api_server.socket_server;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.metadata_system.common.dto.ApiResult;

@RestController("socketIndexController")
@RequestMapping("socket-server/v001/")
public class IndexController {
    @Autowired
    MySocketIOService mySocketIOService;
    @RequestMapping(value = "/")
    public String index(){
        return "socket server";
    }

    @RequestMapping(value = "/SendMessage")
    public ApiResult SendMessage(
            @RequestParam("chatMessage") String chatMessage
    ){
        return mySocketIOService.sendMessage(chatMessage);
    }

}


